<%@page import="com.google.appengine.api.datastore.KeyFactory"%>
<%@page import="cn.edu.hust.sse.software7.class3.entities.EBCategory"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<html>
<head>
<title>Insert title here</title>
<%
	EBCategory category = (EBCategory) session
			.getAttribute("categoryOP");
%>
</head>
<body>
<div style="background-color: activeborder;">
<%
	if (null != session.getAttribute("APMessage")) {
%>
<div><%=session.getAttribute("APMessage")%></div>
<%
	}
%> <%
 	if (null != category) {
 %>
<form action="/product?method=addprod" enctype="multipart/form-data"
	method="post">
<table style="border: medium; background-color: silver; width: 100%;">
	<tr>
		<td>商品名称</td>
		<td><input type="text" name="prodName" /></td>
	</tr>
	<tr>
		<td>商品种类</td>
		<td><%=category.getCategoryName()%><input type="hidden"
			name="prodCategory" value="<%=category.getCategoryId()%>"
			readonly="readonly" /></td>
	</tr>
	<tr>
		<td>商品图片</td>
		<td><input type="file" name="prodImage" /></td>
	</tr>
	<tr>
		<td>商品价格</td>
		<td><input type="text" name="prodLowestPrice" />$</td>
	</tr>

	<tr>
		<td>运费</td>
		<td><input type="text" name="tradingPrice" />$</td>
	</tr>

	<tr>
		<td>一口成交价</td>
		<td><input type="text" name="freight" />$</td>
	</tr>
	<tr>
		<td>商品数量</td>
		<td><input type="text" name="mount" /></td>
	</tr>
	<tr>
		<td>商品描述</td>
		<td><textarea name="description" cols="50" rows="3"></textarea></td>
	</tr>
	<tr>
		<td><input type="reset" value="重  置" /></td>
		<td><input type="submit" value="添  加" /></td>
	</tr>
</table>
</form>
<%
	} else {
%> 没能找到商品目录 <%
	}
%>
</div>
</body>
</html>